<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.6.6" />
<title>Gerrit Code Review - /groups/ REST API</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */

/* Default font. */
body {
  font-family: Georgia,serif;
}

/* Title font. */
h1, h2, h3, h4, h5, h6,
div.title, caption.title,
thead, p.table.header,
#toctitle,
#author, #revnumber, #revdate, #revremark,
#footer {
  font-family: Arial,Helvetica,sans-serif;
}

body {
  margin: 1em 5% 1em 5%;
}

a {
  color: blue;
  text-decoration: underline;
}
a:visited {
  color: fuchsia;
}

em {
  font-style: italic;
  color: navy;
}

strong {
  font-weight: bold;
  color: #083194;
}

h1, h2, h3, h4, h5, h6 {
  color: #527bbd;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h1, h2, h3 {
  border-bottom: 2px solid silver;
}
h2 {
  padding-top: 0.5em;
}
h3 {
  float: left;
}
h3 + * {
  clear: left;
}
h5 {
  font-size: 1.0em;
}

div.sectionbody {
  margin-left: 0;
}

hr {
  border: 1px solid silver;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

ul, ol, li > p {
  margin-top: 0;
}
ul > li     { color: #aaa; }
ul > li > * { color: black; }

pre {
  padding: 0;
  margin: 0;
}

#author {
  color: #527bbd;
  font-weight: bold;
  font-size: 1.1em;
}
#email {
}
#revnumber, #revdate, #revremark {
}

#footer {
  font-size: small;
  border-top: 2px solid silver;
  padding-top: 0.5em;
  margin-top: 4.0em;
}
#footer-text {
  float: left;
  padding-bottom: 0.5em;
}
#footer-badges {
  float: right;
  padding-bottom: 0.5em;
}

#preamble {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}
div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
div.admonitionblock {
  margin-top: 2.0em;
  margin-bottom: 2.0em;
  margin-right: 10%;
  color: #606060;
}

div.content { /* Block element content. */
  padding: 0;
}

/* Block element titles. */
div.title, caption.title {
  color: #527bbd;
  font-weight: bold;
  text-align: left;
  margin-top: 1.0em;
  margin-bottom: 0.5em;
}
div.title + * {
  margin-top: 0;
}

td div.title:first-child {
  margin-top: 0.0em;
}
div.content div.title:first-child {
  margin-top: 0.0em;
}
div.content + div.title {
  margin-top: 0.0em;
}

div.sidebarblock > div.content {
  background: #ffffee;
  border: 1px solid #dddddd;
  border-left: 4px solid #f0f0f0;
  padding: 0.5em;
}

div.listingblock > div.content {
  border: 1px solid #dddddd;
  border-left: 5px solid #f0f0f0;
  background: #f8f8f8;
  padding: 0.5em;
}

div.quoteblock, div.verseblock {
  padding-left: 1.0em;
  margin-left: 1.0em;
  margin-right: 10%;
  border-left: 5px solid #f0f0f0;
  color: #888;
}

div.quoteblock > div.attribution {
  padding-top: 0.5em;
  text-align: right;
}

div.verseblock > pre.content {
  font-family: inherit;
  font-size: inherit;
}
div.verseblock > div.attribution {
  padding-top: 0.75em;
  text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
  text-align: left;
}

div.admonitionblock .icon {
  vertical-align: top;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: underline;
  color: #527bbd;
  padding-right: 0.5em;
}
div.admonitionblock td.content {
  padding-left: 0.5em;
  border-left: 3px solid #dddddd;
}

div.exampleblock > div.content {
  border-left: 3px solid #dddddd;
  padding-left: 0.5em;
}

div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; }
a.image:visited { color: white; }

dl {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
dt {
  margin-top: 0.5em;
  margin-bottom: 0;
  font-style: normal;
  color: navy;
}
dd > *:first-child {
  margin-top: 0.1em;
}

ul, ol {
    list-style-position: outside;
}
ol.arabic {
  list-style-type: decimal;
}
ol.loweralpha {
  list-style-type: lower-alpha;
}
ol.upperalpha {
  list-style-type: upper-alpha;
}
ol.lowerroman {
  list-style-type: lower-roman;
}
ol.upperroman {
  list-style-type: upper-roman;
}

div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
  margin-top: 0.1em;
  margin-bottom: 0.1em;
}

tfoot {
  font-weight: bold;
}
td > div.verse {
  white-space: pre;
}

div.hdlist {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
div.hdlist tr {
  padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
  font-weight: bold;
}
td.hdlist1 {
  vertical-align: top;
  font-style: normal;
  padding-right: 0.8em;
  color: navy;
}
td.hdlist2 {
  vertical-align: top;
}
div.hdlist.compact tr {
  margin: 0;
  padding-bottom: 0;
}

.comment {
  background: yellow;
}

.footnote, .footnoteref {
  font-size: 0.8em;
}

span.footnote, span.footnoteref {
  vertical-align: super;
}

#footnotes {
  margin: 20px 0 20px 0;
  padding: 7px 0 0 0;
}

#footnotes div.footnote {
  margin: 0 0 5px 0;
}

#footnotes hr {
  border: none;
  border-top: 1px solid silver;
  height: 1px;
  text-align: left;
  margin-left: 0;
  width: 20%;
  min-width: 100px;
}

div.colist td {
  padding-right: 0.5em;
  padding-bottom: 0.3em;
  vertical-align: top;
}
div.colist td img {
  margin-top: 0.3em;
}

@media print {
  #footer-badges { display: none; }
}

#toc {
  margin-bottom: 2.5em;
}

#toctitle {
  color: #527bbd;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 1.0em;
  margin-bottom: 0.1em;
}

div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
  margin-top: 0;
  margin-bottom: 0;
}
div.toclevel2 {
  margin-left: 2em;
  font-size: 0.9em;
}
div.toclevel3 {
  margin-left: 4em;
  font-size: 0.9em;
}
div.toclevel4 {
  margin-left: 6em;
  font-size: 0.9em;
}

span.aqua { color: aqua; }
span.black { color: black; }
span.blue { color: blue; }
span.fuchsia { color: fuchsia; }
span.gray { color: gray; }
span.green { color: green; }
span.lime { color: lime; }
span.maroon { color: maroon; }
span.navy { color: navy; }
span.olive { color: olive; }
span.purple { color: purple; }
span.red { color: red; }
span.silver { color: silver; }
span.teal { color: teal; }
span.white { color: white; }
span.yellow { color: yellow; }

span.aqua-background { background: aqua; }
span.black-background { background: black; }
span.blue-background { background: blue; }
span.fuchsia-background { background: fuchsia; }
span.gray-background { background: gray; }
span.green-background { background: green; }
span.lime-background { background: lime; }
span.maroon-background { background: maroon; }
span.navy-background { background: navy; }
span.olive-background { background: olive; }
span.purple-background { background: purple; }
span.red-background { background: red; }
span.silver-background { background: silver; }
span.teal-background { background: teal; }
span.white-background { background: white; }
span.yellow-background { background: yellow; }

span.big { font-size: 2em; }
span.small { font-size: 0.6em; }

span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }


/*
 * xhtml11 specific
 *
 * */

tt {
  font-family: monospace;
  font-size: inherit;
  color: navy;
}

div.tableblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
div.tableblock > table {
  border: 3px solid #527bbd;
}
thead, p.table.header {
  font-weight: bold;
  color: #527bbd;
}
p.table {
  margin-top: 0;
}
/* Because the table frame attribute is overriden by CSS in most browsers. */
div.tableblock > table[frame="void"] {
  border-style: none;
}
div.tableblock > table[frame="hsides"] {
  border-left-style: none;
  border-right-style: none;
}
div.tableblock > table[frame="vsides"] {
  border-top-style: none;
  border-bottom-style: none;
}


/*
 * html5 specific
 *
 * */

.monospaced {
  font-family: monospace;
  font-size: inherit;
  color: navy;
}

table.tableblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
thead, p.tableblock.header {
  font-weight: bold;
  color: #527bbd;
}
p.tableblock {
  margin-top: 0;
}
table.tableblock {
  border-width: 3px;
  border-spacing: 0px;
  border-style: solid;
  border-color: #527bbd;
  border-collapse: collapse;
}
th.tableblock, td.tableblock {
  border-width: 1px;
  padding: 4px;
  border-style: solid;
  border-color: #527bbd;
}

table.tableblock.frame-topbot {
  border-left-style: hidden;
  border-right-style: hidden;
}
table.tableblock.frame-sides {
  border-top-style: hidden;
  border-bottom-style: hidden;
}
table.tableblock.frame-none {
  border-style: hidden;
}

th.tableblock.halign-left, td.tableblock.halign-left {
  text-align: left;
}
th.tableblock.halign-center, td.tableblock.halign-center {
  text-align: center;
}
th.tableblock.halign-right, td.tableblock.halign-right {
  text-align: right;
}

th.tableblock.valign-top, td.tableblock.valign-top {
  vertical-align: top;
}
th.tableblock.valign-middle, td.tableblock.valign-middle {
  vertical-align: middle;
}
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
  vertical-align: bottom;
}


/*
 * manpage specific
 *
 * */

body.manpage h1 {
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  border-top: 2px solid silver;
  border-bottom: 2px solid silver;
}
body.manpage h2 {
  border-style: none;
}
body.manpage div.sectionbody {
  margin-left: 3em;
}

@media print {
  body.manpage div#toc { display: none; }
}
</style>
<script type="text/javascript">
/*<![CDATA[*/
var asciidoc = {  // Namespace.

/////////////////////////////////////////////////////////////////////
// Table Of Contents generator
/////////////////////////////////////////////////////////////////////

/* Author: Mihai Bazon, September 2002
 * http://students.infoiasi.ro/~mishoo
 *
 * Table Of Content generator
 * Version: 0.4
 *
 * Feel free to use this script under the terms of the GNU General Public
 * License, as long as you do not remove or alter this notice.
 */

 /* modified by Troy D. Hanson, September 2006. License: GPL */
 /* modified by Stuart Rackham, 2006, 2009. License: GPL */

// toclevels = 1..4.
toc: function (toclevels) {

  function getText(el) {
    var text = "";
    for (var i = el.firstChild; i != null; i = i.nextSibling) {
      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
        text += i.data;
      else if (i.firstChild != null)
        text += getText(i);
    }
    return text;
  }

  function TocEntry(el, text, toclevel) {
    this.element = el;
    this.text = text;
    this.toclevel = toclevel;
  }

  function tocEntries(el, toclevels) {
    var result = new Array;
    var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
    // Function that scans the DOM tree for header elements (the DOM2
    // nodeIterator API would be a better technique but not supported by all
    // browsers).
    var iterate = function (el) {
      for (var i = el.firstChild; i != null; i = i.nextSibling) {
        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
          var mo = re.exec(i.tagName);
          if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
          }
          iterate(i);
        }
      }
    }
    iterate(el);
    return result;
  }

  var toc = document.getElementById("toc");
  if (!toc) {
    return;
  }

  // Delete existing TOC entries in case we're reloading the TOC.
  var tocEntriesToRemove = [];
  var i;
  for (i = 0; i < toc.childNodes.length; i++) {
    var entry = toc.childNodes[i];
    if (entry.nodeName == 'div'
     && entry.getAttribute("class")
     && entry.getAttribute("class").match(/^toclevel/))
      tocEntriesToRemove.push(entry);
  }
  for (i = 0; i < tocEntriesToRemove.length; i++) {
    toc.removeChild(tocEntriesToRemove[i]);
  }

  // Rebuild TOC entries.
  var entries = tocEntries(document.getElementById("content"), toclevels);
  for (var i = 0; i < entries.length; ++i) {
    var entry = entries[i];
    if (entry.element.id == "")
      entry.element.id = "_toc_" + i;
    var a = document.createElement("a");
    a.href = "#" + entry.element.id;
    a.appendChild(document.createTextNode(entry.text));
    var div = document.createElement("div");
    div.appendChild(a);
    div.className = "toclevel" + entry.toclevel;
    toc.appendChild(div);
  }
  if (entries.length == 0)
    toc.parentNode.removeChild(toc);
},


/////////////////////////////////////////////////////////////////////
// Footnotes generator
/////////////////////////////////////////////////////////////////////

/* Based on footnote generation code from:
 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
 */

footnotes: function () {
  // Delete existing footnote entries in case we're reloading the footnodes.
  var i;
  var noteholder = document.getElementById("footnotes");
  if (!noteholder) {
    return;
  }
  var entriesToRemove = [];
  for (i = 0; i < noteholder.childNodes.length; i++) {
    var entry = noteholder.childNodes[i];
    if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
      entriesToRemove.push(entry);
  }
  for (i = 0; i < entriesToRemove.length; i++) {
    noteholder.removeChild(entriesToRemove[i]);
  }

  // Rebuild footnote entries.
  var cont = document.getElementById("content");
  var spans = cont.getElementsByTagName("span");
  var refs = {};
  var n = 0;
  for (i=0; i<spans.length; i++) {
    if (spans[i].className == "footnote") {
      n++;
      var note = spans[i].getAttribute("data-note");
      if (!note) {
        // Use [\s\S] in place of . so multi-line matches work.
        // Because JavaScript has no s (dotall) regex flag.
        note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
        spans[i].innerHTML =
          "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
          "' title='View footnote' class='footnote'>" + n + "</a>]";
        spans[i].setAttribute("data-note", note);
      }
      noteholder.innerHTML +=
        "<div class='footnote' id='_footnote_" + n + "'>" +
        "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
        n + "</a>. " + note + "</div>";
      var id =spans[i].getAttribute("id");
      if (id != null) refs["#"+id] = n;
    }
  }
  if (n == 0)
    noteholder.parentNode.removeChild(noteholder);
  else {
    // Process footnoterefs.
    for (i=0; i<spans.length; i++) {
      if (spans[i].className == "footnoteref") {
        var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
        href = href.match(/#.*/)[0];  // Because IE return full URL.
        n = refs[href];
        spans[i].innerHTML =
          "[<a href='#_footnote_" + n +
          "' title='View footnote' class='footnote'>" + n + "</a>]";
      }
    }
  }
},

install: function(toclevels) {
  var timerId;

  function reinstall() {
    asciidoc.footnotes();
    if (toclevels) {
      asciidoc.toc(toclevels);
    }
  }

  function reinstallAndRemoveTimer() {
    clearInterval(timerId);
    reinstall();
  }

  timerId = setInterval(reinstall, 500);
  if (document.addEventListener)
    document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
  else
    window.onload = reinstallAndRemoveTimer;
}

}
asciidoc.install(2);
/*]]>*/
</script>
</head>
<body class="article">
<div id="header">
<h1>Gerrit Code Review - /groups/ REST API</h1>
<span id="revnumber">version 2.7</span>
<div id="toc">
  <div id="toctitle">Table of Contents</div>
  <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
</div>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p>This page describes the group related REST endpoints.
Please also take note of the general information on the
<a href="rest-api.html">REST API</a>.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="group-endpoints">Group Endpoints</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="list-groups">List Groups</h3>
<div class="verseblock">
<pre class="content"><em>GET /groups/</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Lists the groups accessible by the caller. This is the same as
using the <a href="cmd-ls-groups.html">ls-groups</a> command over SSH,
and accepts the same options as query parameters.</p></div>
<div class="paragraph"><p>As result a map is returned that maps the group names to
<a href="#group-info">GroupInfo</a> entries. The entries in the map are sorted
by group name.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/ HTTP/1.0</tt></pre>
</div></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "Administrators": {
      "kind": "gerritcodereview#group",
      "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
      "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
      "options": {
      },
      "description": "Gerrit Site Administrators",
      "group_id": 1,
      "owner": "Administrators",
      "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
    },
    "Anonymous Users": {
      "kind": "gerritcodereview#group",
      "id": "global%3AAnonymous-Users",
      "url": "#/admin/groups/uuid-global%3AAnonymous-Users",
      "options": {
      },
      "description": "Any user, signed-in or not",
      "group_id": 2,
      "owner": "Administrators",
      "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
    },
    "MyProject_Committers": {
      "kind": "gerritcodereview#group",
      "id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7",
      "url": "#/admin/groups/uuid-834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7",
      "options": {
        "visible_to_all": true,
      },
      "group_id": 6,
      "owner": "MyProject_Committers",
      "owner_id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7"
    },
    "Non-Interactive Users": {
      "kind": "gerritcodereview#group",
      "id": "5057f3cbd3519d6ab69364429a89ffdffba50f73",
      "url": "#/admin/groups/uuid-5057f3cbd3519d6ab69364429a89ffdffba50f73",
      "options": {
      },
      "description": "Users who perform batch actions on Gerrit",
      "group_id": 4,
      "owner": "Administrators",
      "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
    },
    "Project Owners": {
      "kind": "gerritcodereview#group",
      "id": "global%3AProject-Owners",
      "url": "#/admin/groups/uuid-global%3AProject-Owners",
      "options": {
      },
      "description": "Any owner of the project",
      "group_id": 5,
      "owner": "Administrators",
      "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
    },
    "Registered Users": {
      "kind": "gerritcodereview#group",
      "id": "global%3ARegistered-Users",
      "url": "#/admin/groups/uuid-global%3ARegistered-Users",
      "options": {
      },
      "description": "Any signed-in user",
      "group_id": 3,
      "owner": "Administrators",
      "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
    }
  }</tt></pre>
</div></div>
<div class="sidebarblock">
<div class="content">
<div class="title">Get all groups</div>
<a id="/groups/" onmousedown="javascript:
  var i =  document.URL.lastIndexOf('/Documentation/');
  var url = document.URL.substring(0, i) + '/groups/';
  document.getElementById('/groups/').href = url;">
    GET /groups/ HTTP/1.0
</a>
</div></div>
<div class="sect3">
<h4 id="group-options">Group Options</h4>
<div class="paragraph"><p>Additional fields can be obtained by adding <tt>o</tt> parameters, each option
requires more lookups and slows down the query response time to the
client so they are generally disabled by default. Optional fields are:</p></div>
<div class="openblock" id="includes">
<div class="content">
<div class="ulist"><ul>
<li>
<p>
<tt>INCLUDES</tt>: include list of directly included groups.
</p>
</li>
</ul></div>
</div></div>
<div class="openblock" id="members">
<div class="content">
<div class="ulist"><ul>
<li>
<p>
<tt>MEMBERS</tt>: include list of direct group members.
</p>
</li>
</ul></div>
</div></div>
</div>
<div class="sect3">
<h4 id="_check_if_a_group_is_owned_by_the_calling_user">Check if a group is owned by the calling user</h4>
<div class="paragraph"><p>By setting the option <tt>owned</tt> and specifying a group to inspect with
the option <tt>q</tt>, it is possible to find out, if this group is owned by
the calling user.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/?owned&amp;q=MyProject-Committers HTTP/1.0</tt></pre>
</div></div>
<div class="paragraph"><p>If the group is owned by the calling user, the returned map contains
this group. If the calling user doesn&#8217;t own this group an empty map is
returned.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "MyProject-Committers": {
      "kind": "gerritcodereview#group",
      "id": "9999c971bb4ab872aab759d8c49833ee6b9ff320",
      "url": "#/admin/groups/uuid-9999c971bb4ab872aab759d8c49833ee6b9ff320",
      "options": {
        "visible_to_all": true
      },
      "description":"contains all committers for MyProject",
      "group_id": 551,
      "owner": "MyProject-Owners",
      "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc"
    }
  }</tt></pre>
</div></div>
</div>
</div>
<div class="sect2">
<h3 id="get-group">Get Group</h3>
<div class="verseblock">
<pre class="content"><em>GET /groups/<a href="#group-id">{group-id}</a></em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Retrieves a group.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/6a1e70e1a88782771a91808c8af9bbb7a9871389 HTTP/1.0</tt></pre>
</div></div>
<div class="paragraph"><p>As response a <a href="#group-info">GroupInfo</a> entity is returned that
describes the group.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "kind": "gerritcodereview#group",
    "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
    "name": "Administrators",
    "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
    "options": {
    },
    "description": "Gerrit Site Administrators",
    "group_id": 1,
    "owner": "Administrators",
    "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
  }</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="create-group">Create Group</h3>
<div class="verseblock">
<pre class="content"><em>PUT /groups/<a href="#group-name">{group-name}</a></em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Creates a new Gerrit internal group.</p></div>
<div class="paragraph"><p>In the request body additional data for the group can be provided as
<a href="#group-input">GroupInput</a>.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  PUT /groups/MyProject-Committers HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "description": "contains all committers for MyProject",
    "visible_to_all": true,
    "owner": "MyProject-Owners",
    "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc"
  }</tt></pre>
</div></div>
<div class="paragraph"><p>As response the <a href="#group-info">GroupInfo</a> entity is returned that
describes the created group.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 201 Created
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "kind": "gerritcodereview#group",
    "id": "9999c971bb4ab872aab759d8c49833ee6b9ff320",
    "name": "MyProject-Committers",
    "url": "#/admin/groups/uuid-9999c971bb4ab872aab759d8c49833ee6b9ff320",
    "options": {
      "visible_to_all": true
    },
    "description":"contains all committers for MyProject",
    "group_id": 551,
    "owner": "MyProject-Owners",
    "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc"
  }</tt></pre>
</div></div>
<div class="paragraph"><p>If the group creation fails because the name is already in use the
response is "<tt>409 Conflict</tt>".</p></div>
</div>
<div class="sect2">
<h3 id="get-group-detail">Get Group Detail</h3>
<div class="verseblock">
<pre class="content"><em>GET /groups/<a href="#group-id">{group-id}</a>/detail</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Retrieves a group with the direct <a href="#members">members</a> and the
directly <a href="#includes">included groups</a>.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/6a1e70e1a88782771a91808c8af9bbb7a9871389/detail HTTP/1.0</tt></pre>
</div></div>
<div class="paragraph"><p>As response a <a href="#group-info">GroupInfo</a> entity is returned that
describes the group.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "kind": "gerritcodereview#group",
    "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
    "name": "Administrators",
    "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
    "options": {
    },
    "description": "Gerrit Site Administrators",
    "group_id": 1,
    "owner": "Administrators",
    "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
    "members": [
      {
        "_account_id": 1000097,
        "name": "Jane Roe",
        "email": "jane.roe@example.com"
      },
      {
        "_account_id": 1000096,
        "name": "John Doe",
        "email": "john.doe@example.com"
      }
    ],
    "includes": []
  }</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="get-group-name">Get Group Name</h3>
<div class="verseblock">
<pre class="content"><em>GET /groups/<a href="#group-id">{group-id}</a>/name</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Retrieves the name of a group.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/name HTTP/1.0</tt></pre>
</div></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  "MyProject-Committers"</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="rename-group">Rename Group</h3>
<div class="verseblock">
<pre class="content"><em>PUT /groups/<a href="#group-id">{group-id}</a>/name</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Renames a Gerrit internal group.</p></div>
<div class="paragraph"><p>The new group name must be provided in the request body.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  PUT /groups/MyProject-Committers/name HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "name": "My-Project-Committers"
  }</tt></pre>
</div></div>
<div class="paragraph"><p>As response the new group name is returned.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  "My-Project-Committers"</tt></pre>
</div></div>
<div class="paragraph"><p>If renaming the group fails because the new name is already in use the
response is "<tt>409 Conflict</tt>".</p></div>
</div>
<div class="sect2">
<h3 id="get-group-description">Get Group Description</h3>
<div class="verseblock">
<pre class="content"><em>GET /groups/<a href="#group-id">{group-id}</a>/description</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Retrieves the description of a group.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0</tt></pre>
</div></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  "contains all committers for MyProject"</tt></pre>
</div></div>
<div class="paragraph"><p>If the group does not have a description an empty string is returned.</p></div>
</div>
<div class="sect2">
<h3 id="set-group-description">Set Group Description</h3>
<div class="verseblock">
<pre class="content"><em>PUT /groups/<a href="#group-id">{group-id}</a>/description</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Sets the description of a Gerrit internal group.</p></div>
<div class="paragraph"><p>The new group description must be provided in the request body.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  PUT /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "description": "The committers of MyProject."
  }</tt></pre>
</div></div>
<div class="paragraph"><p>As response the new group description is returned.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  "The committers of MyProject."</tt></pre>
</div></div>
<div class="paragraph"><p>If the description was deleted the response is "<tt>204 No Content</tt>".</p></div>
</div>
<div class="sect2">
<h3 id="delete-group-description">Delete Group Description</h3>
<div class="verseblock">
<pre class="content"><em>DELETE /groups/<a href="#group-id">{group-id}</a>/description</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Deletes the description of a Gerrit internal group.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  DELETE /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0</tt></pre>
</div></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 204 No Content</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="get-group-options">Get Group Options</h3>
<div class="verseblock">
<pre class="content"><em>GET /groups/<a href="#group-id">{group-id}</a>/options</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Retrieves the options of a group.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/options HTTP/1.0</tt></pre>
</div></div>
<div class="paragraph"><p>As response a <a href="#group-options-info">GroupOptionsInfo</a> entity is
returned that describes the options of the group.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "visible_to_all": true
  }</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="set-group-options">Set Group Options</h3>
<div class="verseblock">
<pre class="content"><em>PUT /groups/<a href="#group-id">{group-id}</a>/options</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Sets the options of a Gerrit internal group.</p></div>
<div class="paragraph"><p>The new group options must be provided in the request body as a
<a href="#group-options-input">GroupOptionsInput</a> entity.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  PUT /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/options HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "visible_to_all": true
  }</tt></pre>
</div></div>
<div class="paragraph"><p>As response the new group options are returned as a
<a href="#group-options-info">GroupOptionsInfo</a> entity.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "visible_to_all": true
  }</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="get-group-owner">Get Group Owner</h3>
<div class="verseblock">
<pre class="content"><em>GET /groups/<a href="#group-id">{group-id}</a>/owner</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Retrieves the owner group of a Gerrit internal group.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/owner HTTP/1.0</tt></pre>
</div></div>
<div class="paragraph"><p>As response a <a href="#group-info">GroupInfo</a> entity is returned that
describes the owner group.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "kind": "gerritcodereview#group",
    "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
    "name": "Administrators",
    "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
    "options": {
    },
    "description": "Gerrit Site Administrators",
    "group_id": 1,
    "owner": "Administrators",
    "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
  }</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="set-group-owner">Set Group Owner</h3>
<div class="verseblock">
<pre class="content"><em>PUT /groups/<a href="#group-id">{group-id}</a>/owner</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Sets the owner group of a Gerrit internal group.</p></div>
<div class="paragraph"><p>The new owner group must be provided in the request body.</p></div>
<div class="paragraph"><p>The new owner can be specified by name, by group UUID or by the legacy
numeric group ID.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  PUT /groups/9999c971bb4ab872aab759d8c49833ee6b9ff320/description HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "owner": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
  }</tt></pre>
</div></div>
<div class="paragraph"><p>As response a <a href="#group-info">GroupInfo</a> entity is returned that
describes the new owner group.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "kind": "gerritcodereview#group",
    "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
    "name": "Administrators",
    "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
    "options": {
    },
    "description": "Gerrit Site Administrators",
    "group_id": 1,
    "owner": "Administrators",
    "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
  }</tt></pre>
</div></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="group-member-endpoints">Group Member Endpoints</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="group-members">List Group Members</h3>
<div class="verseblock">
<pre class="content"><em>GET /groups/<a href="#group-id">{group-id}</a>/members/</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Lists the direct members of a Gerrit internal group.</p></div>
<div class="paragraph"><p>As result a list of detailed <a href="rest-api-accounts.html#account-info">
AccountInfo</a> entries is returned. The entries in the list are sorted by
full name, preferred email and id.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/members/ HTTP/1.0</tt></pre>
</div></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  [
    {
      "_account_id": 1000097,
      "name": "Jane Roe",
      "email": "jane.roe@example.com"
    },
    {
      "_account_id": 1000096,
      "name": "John Doe",
      "email": "john.doe@example.com"
    }
  ]</tt></pre>
</div></div>
<div class="sidebarblock">
<div class="content">
<div class="title">Get all members of the <em>Administrators</em> group (normally group id = 1)</div>
<a id="/groups/1/members/" onmousedown="javascript:
  var i =  document.URL.lastIndexOf('/Documentation/');
  var url = document.URL.substring(0, i) + '/groups/1/members/';
  document.getElementById('/groups/1/members/').href = url;">
    GET /groups/1/members/ HTTP/1.0
</a>
</div></div>
<div class="paragraph"><p>To resolve the included groups of a group recursively and to list all
members the parameter <tt>recursive</tt> can be set.</p></div>
<div class="paragraph"><p>Members from included external groups and from included groups which
are not visible to the calling user are ignored.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/members/?recursive HTTP/1.0</tt></pre>
</div></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  [
    {
      "_account_id": 1000097,
      "name": "Jane Roe",
      "email": "jane.roe@example.com"
    },
    {
      "_account_id": 1000096,
      "name": "John Doe",
      "email": "john.doe@example.com"
    },
    {
      "_account_id": 1000098,
      "name": "Richard Roe",
      "email": "richard.roe@example.com"
    }
  ]</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="get-group-member">Get Group Member</h3>
<div class="verseblock">
<pre class="content"><em>GET /groups/<a href="#group-id">{group-id}</a>/members/<a href="rest-api-accounts.html#account-id">{account-id}</a></em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Retrieves a group member.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/members/1000096 HTTP/1.0</tt></pre>
</div></div>
<div class="paragraph"><p>As response a detailed <a href="rest-api-accounts.html#account-info">
AccountInfo</a> entity is returned that describes the group member.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "_account_id": 1000096,
    "name": "John Doe",
    "email": "john.doe@example.com"
  }</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="add-group-member">Add Group Member</h3>
<div class="verseblock">
<pre class="content"><em>PUT /groups/<a href="#group-id">{group-id}</a>/members/<a href="rest-api-accounts.html#account-id">{account-id}</a></em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Adds a user as member to a Gerrit internal group.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  PUT /groups/MyProject-Committers/members/John%20Doe HTTP/1.0</tt></pre>
</div></div>
<div class="paragraph"><p>As response a detailed <a href="rest-api-accounts.html#account-info">
AccountInfo</a> entity is returned that describes the group member.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 201 Created
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "_account_id": 1000037,
    "name": "John Doe",
    "email": "john.doe@example.com"
  }</tt></pre>
</div></div>
<div class="paragraph"><p>The request also succeeds if the user is already a member of this
group, but then the HTTP response code is <tt>200 OK</tt>.</p></div>
</div>
<div class="sect2">
<h3 id="_add_group_members">Add Group Members</h3>
<div class="verseblock">
<pre class="content"><em>POST /groups/<a href="#group-id">{group-id}</a>/members</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>OR</p></div>
<div class="verseblock">
<pre class="content"><em>POST /groups/<a href="#group-id">{group-id}</a>/members.add</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Adds one or several users to a Gerrit internal group.</p></div>
<div class="paragraph"><p>The users to be added to the group must be provided in the request body
as a <a href="#members-input">MembersInput</a> entity.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  POST /groups/MyProject-Committers/members.add HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "members": {
      "jane.roe@example.com",
      "john.doe@example.com"
    }
  }</tt></pre>
</div></div>
<div class="paragraph"><p>As response a list of detailed <a href="rest-api-accounts.html#account-info">
AccountInfo</a> entities is returned that describes the group members that
were specified in the <a href="#members-input">MembersInput</a>. An
<a href="rest-api-accounts.html#account-info">AccountInfo</a> entity
is returned for each user specified in the input, independently of
whether the user was newly added to the group or whether the user was
already a member of the group.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  [
    {
      "_account_id": 1000057,
      "name": "Jane Roe",
      "email": "jane.roe@example.com"
    },
    {
      "_account_id": 1000037,
      "name": "John Doe",
      "email": "john.doe@example.com"
    }
  ]</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="delete-group-member">Delete Group Member</h3>
<div class="verseblock">
<pre class="content"><em>DELETE /groups/<a href="#group-id">{group-id}</a>/members/<a href="rest-api-accounts.html#account-id">{account-id}</a></em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Deletes a user from a Gerrit internal group.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  DELETE /groups/MyProject-Committers/members/John%20Doe HTTP/1.0</tt></pre>
</div></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 204 No Content</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="delete-group-members">Delete Group Members</h3>
<div class="verseblock">
<pre class="content"><em>POST /groups/<a href="#group-id">{group-id}</a>/members.delete</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Delete one or several users from a Gerrit internal group.</p></div>
<div class="paragraph"><p>The users to be deleted from the group must be provided in the request
body as a <a href="#members-input">MembersInput</a> entity.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  POST /groups/MyProject-Committers/members.delete HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "members": {
      "jane.roe@example.com",
      "john.doe@example.com"
    }
  }</tt></pre>
</div></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 204 No Content</tt></pre>
</div></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="group-include-endpoints">Group Include Endpoints</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="included-groups">List Included Groups</h3>
<div class="verseblock">
<pre class="content"><em>GET /groups/<a href="#group-id">{group-id}</a>/groups/</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Lists the directly included groups of a group.</p></div>
<div class="paragraph"><p>As result a list of <a href="#group-info">GroupInfo</a> entries is returned.
The entries in the list are sorted by group name and UUID.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/groups/ HTTP/1.0</tt></pre>
</div></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  [
    {
      "kind": "gerritcodereview#group",
      "id": "7ca042f4d5847936fcb90ca91057673157fd06fc",
      "name": "MyProject-Verifiers",
      "url": "#/admin/groups/uuid-7ca042f4d5847936fcb90ca91057673157fd06fc",
      "options": {
      },
      "group_id": 38,
      "owner": "MyProject-Verifiers",
      "owner_id": "7ca042f4d5847936fcb90ca91057673157fd06fc"
    }
  ]</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="get-included-group">Get Included Group</h3>
<div class="verseblock">
<pre class="content"><em>GET /groups/<a href="#group-id">{group-id}</a>/groups/<a href="#group-id">{group-id}</a></em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Retrieves an included group.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  GET /groups/834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7/groups/7ca042f4d5847936fcb90ca91057673157fd06fc HTTP/1.0</tt></pre>
</div></div>
<div class="paragraph"><p>As response a <a href="#group-info">GroupInfo</a> entity is returned that
describes the included group.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "kind": "gerritcodereview#group",
    "id": "7ca042f4d5847936fcb90ca91057673157fd06fc",
    "name": "MyProject-Verifiers",
    "url": "#/admin/groups/uuid-7ca042f4d5847936fcb90ca91057673157fd06fc",
    "options": {
    },
    "group_id": 38,
    "owner": "Administrators",
    "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
  }</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="include-group">Include Group</h3>
<div class="verseblock">
<pre class="content"><em>PUT /groups/<a href="#group-id">{group-id}</a>/groups/<a href="#group-id">{group-id}</a></em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Includes a group into a Gerrit internal group.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  PUT /groups/MyProject-Committers/groups/MyGroup HTTP/1.0</tt></pre>
</div></div>
<div class="paragraph"><p>As response a <a href="#group-info">GroupInfo</a> entity is returned that
describes the included group.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 201 Created
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  {
    "kind": "gerritcodereview#group",
    "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
    "name": "MyGroup",
    "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
    "options": {
    },
    "group_id": 8,
    "owner": "Administrators",
    "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
  }</tt></pre>
</div></div>
<div class="paragraph"><p>The request also succeeds if the group is already included in this
group, but then the HTTP response code is <tt>200 OK</tt>.</p></div>
</div>
<div class="sect2">
<h3 id="include-groups">Include Groups</h3>
<div class="verseblock">
<pre class="content"><em>POST /groups/<a href="#group-id">{group-id}</a>/groups</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>OR</p></div>
<div class="verseblock">
<pre class="content"><em>POST /groups/<a href="#group-id">{group-id}</a>/groups.add</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Includes one or several groups into a Gerrit internal group.</p></div>
<div class="paragraph"><p>The groups to be included into the group must be provided in the
request body as a <a href="#groups-input">GroupsInput</a> entity.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  POST /groups/MyProject-Committers/groups.add HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "groups": {
      "MyGroup",
      "MyOtherGroup"
    }
  }</tt></pre>
</div></div>
<div class="paragraph"><p>As response a list of <a href="#group-info">GroupInfo</a> entities is
returned that describes the groups that were specified in the
<a href="#groups-input">GroupsInput</a>. A <a href="#group-info">GroupInfo</a> entity
is returned for each group specified in the input, independently of
whether the group was newly included into the group or whether the
group was already included in the group.</p></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 200 OK
  Content-Disposition: attachment
  Content-Type: application/json;charset=UTF-8

  )]}'
  [
    {
      "kind": "gerritcodereview#group",
      "id": "6a1e70e1a88782771a91808c8af9bbb7a9871389",
      "name": "MyGroup",
      "url": "#/admin/groups/uuid-6a1e70e1a88782771a91808c8af9bbb7a9871389",
      "options": {
      },
      "group_id": 8,
      "owner": "Administrators",
      "owner_id": "6a1e70e1a88782771a91808c8af9bbb7a9871389"
    },
    {
      "kind": "gerritcodereview#group",
      "id": "5057f3cbd3519d6ab69364429a89ffdffba50f73",
      "name": "MyOtherGroup",
      "url": "#/admin/groups/uuid-5057f3cbd3519d6ab69364429a89ffdffba50f73",
      "options": {
      },
      "group_id": 10,
      "owner": "MyOtherGroup",
      "owner_id": "5057f3cbd3519d6ab69364429a89ffdffba50f73"
    }
  ]</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="delete-included-group">Delete Included Group</h3>
<div class="verseblock">
<pre class="content"><em>DELETE /groups/<a href="#group-id">{group-id}</a>/groups/<a href="#group-id">{group-id}</a></em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Deletes an included group from a Gerrit internal group.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  DELETE /groups/MyProject-Committers/groups/MyGroup HTTP/1.0</tt></pre>
</div></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 204 No Content</tt></pre>
</div></div>
</div>
<div class="sect2">
<h3 id="delete-included-groups">Delete Included Groups</h3>
<div class="verseblock">
<pre class="content"><em>POST /groups/<a href="#group-id">{group-id}</a>/groups.delete</em></pre>
<div class="attribution">
</div></div>
<div class="paragraph"><p>Delete one or several included groups from a Gerrit internal group.</p></div>
<div class="paragraph"><p>The groups to be deleted from the group must be provided in the request
body as a <a href="#groups-input">GroupsInput</a> entity.</p></div>
<div class="listingblock">
<div class="title">Request</div>
<div class="content">
<pre><tt>  POST /groups/MyProject-Committers/groups.delete HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "members": {
      "MyGroup",
      "MyOtherGroup"
    }
  }</tt></pre>
</div></div>
<div class="listingblock">
<div class="title">Response</div>
<div class="content">
<pre><tt>  HTTP/1.1 204 No Content</tt></pre>
</div></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="ids">IDs</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="account-id"><a href="rest-api-accounts.html#account-id">{account-id}</a></h3>
<div class="openblock">
<div class="content">
</div></div>
</div>
<div class="sect2">
<h3 id="group-id">{group-id}</h3>
<div class="paragraph"><p>Identifier for a group.</p></div>
<div class="paragraph"><p>This can be:</p></div>
<div class="ulist"><ul>
<li>
<p>
the UUID of the group
</p>
</li>
<li>
<p>
the legacy numeric ID of the group
</p>
</li>
<li>
<p>
the name of the group if it is unique
</p>
</li>
</ul></div>
</div>
<div class="sect2">
<h3 id="group-name">{group-name}</h3>
<div class="paragraph"><p>Group name that uniquely identifies one group.</p></div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="json-entities">JSON Entities</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="group-info">GroupInfo</h3>
<div class="paragraph"><p>The <tt>GroupInfo</tt> entity contains information about a group. This can be
a Gerrit internal group, or an external group that is known to Gerrit.</p></div>
<div class="tableblock">
<table rules="all"
width="50%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="14%" />
<col width="14%" />
<col width="71%" />
<thead>
<tr>
<th align="left" valign="top">Field Name    </th>
<th align="center" valign="top"></th>
<th align="left" valign="top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><p class="table"><tt>kind</tt></p></td>
<td align="center" valign="top"><p class="table"></p></td>
<td align="left" valign="top"><p class="table"><tt>gerritcodereview#group</tt></p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>id</tt></p></td>
<td align="center" valign="top"><p class="table"></p></td>
<td align="left" valign="top"><p class="table">The URL encoded UUID of the group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>name</tt></p></td>
<td align="center" valign="top"><p class="table">not set if returned in a map where the group name is used as map key</p></td>
<td align="left" valign="top"><p class="table">The name of the group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>url</tt></p></td>
<td align="center" valign="top"><p class="table">optional</p></td>
<td align="left" valign="top"><p class="table">URL to information about the group. Typically a URL to a web page that
permits users to apply to join the group, or manage their membership.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>options</tt></p></td>
<td align="center" valign="top"><p class="table"></p></td>
<td align="left" valign="top"><p class="table"><a href="#group-options-info">Options of the group</a></p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>description</tt></p></td>
<td align="center" valign="top"><p class="table">only for internal groups</p></td>
<td align="left" valign="top"><p class="table">The description of the group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>group_id</tt></p></td>
<td align="center" valign="top"><p class="table">only for internal groups</p></td>
<td align="left" valign="top"><p class="table">The numeric ID of the group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>owner</tt></p></td>
<td align="center" valign="top"><p class="table">only for internal groups</p></td>
<td align="left" valign="top"><p class="table">The name of the owner group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>owner_id</tt></p></td>
<td align="center" valign="top"><p class="table">only for internal groups</p></td>
<td align="left" valign="top"><p class="table">The URL encoded UUID of the owner group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>members</tt></p></td>
<td align="center" valign="top"><p class="table">optional, only for internal groups</p></td>
<td align="left" valign="top"><p class="table">A list of <a href="rest-api-accounts.html#account-info">AccountInfo</a>
entities describing the direct members.<br />
Only set if <a href="#members">members</a> are requested.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>includes</tt></p></td>
<td align="center" valign="top"><p class="table">optional, only for internal groups</p></td>
<td align="left" valign="top"><p class="table">A list of <a href="#group-info">GroupInfo</a> entities describing the directly
included groups.<br />
Only set if <a href="#includes">included groups</a> are requested.</p></td>
</tr>
</tbody>
</table>
</div>
<div class="paragraph"><p>The type of a group can be deduced from the group&#8217;s UUID:</p></div>
<div class="tableblock">
<table rules="all"
width="50%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="50%" />
<col width="50%" />
<tbody>
<tr>
<td align="left" valign="top"><p class="table">UUID matches "^[0-9a-f]{40}$"</p></td>
<td align="left" valign="top"><p class="table">Gerrit internal group</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">UUID starts with "global:"</p></td>
<td align="left" valign="top"><p class="table">Gerrit system group</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">UUID starts with "ldap:"</p></td>
<td align="left" valign="top"><p class="table">LDAP group</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table">UUID starts with "&lt;prefix&gt;:"</p></td>
<td align="left" valign="top"><p class="table">other external group</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect2">
<h3 id="group-input">GroupInput</h3>
<div class="paragraph"><p>The <em>GroupInput</em> entity contains information for the creation of
a new internal group.</p></div>
<div class="tableblock">
<table rules="all"
width="50%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="14%" />
<col width="14%" />
<col width="71%" />
<thead>
<tr>
<th align="left" valign="top">Field Name      </th>
<th align="center" valign="top"></th>
<th align="left" valign="top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><p class="table"><tt>name</tt></p></td>
<td align="center" valign="top"><p class="table">optional</p></td>
<td align="left" valign="top"><p class="table">The name of the group (not encoded).<br />
If set, must match the group name in the URL.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>description</tt></p></td>
<td align="center" valign="top"><p class="table">optional</p></td>
<td align="left" valign="top"><p class="table">The description of the group.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>visible_to_all</tt></p></td>
<td align="center" valign="top"><p class="table">optional</p></td>
<td align="left" valign="top"><p class="table">Whether the group is visible to all registered users.<br />
<tt>false</tt> if not set.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>owner_id</tt></p></td>
<td align="center" valign="top"><p class="table">optional</p></td>
<td align="left" valign="top"><p class="table">The URL encoded ID of the owner group.<br />
This can be a group UUID, a legacy numeric group ID or a unique group
name.<br />
If not set, the new group will be self-owned.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect2">
<h3 id="groups-input">GroupsInput</h3>
<div class="paragraph"><p>The <tt>GroupsInput</tt> entity contains information about groups that should
be included into a group or that should be deleted from a group.</p></div>
<div class="tableblock">
<table rules="all"
width="50%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="14%" />
<col width="14%" />
<col width="71%" />
<thead>
<tr>
<th align="left" valign="top">Field Name   </th>
<th align="center" valign="top"></th>
<th align="left" valign="top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><p class="table"><tt>_one_group</tt></p></td>
<td align="center" valign="top"><p class="table">optional</p></td>
<td align="left" valign="top"><p class="table">The <a href="#group-id">id</a> of one group that should be included or deleted.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>groups</tt></p></td>
<td align="center" valign="top"><p class="table">optional</p></td>
<td align="left" valign="top"><p class="table">A list of <a href="#group-id">group ids</a> that identify the groups that
should be included or deleted.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect2">
<h3 id="group-options-info">GroupOptionsInfo</h3>
<div class="paragraph"><p>Options of the group.</p></div>
<div class="tableblock">
<table rules="all"
width="50%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="14%" />
<col width="14%" />
<col width="71%" />
<thead>
<tr>
<th align="left" valign="top">Field Name      </th>
<th align="center" valign="top"></th>
<th align="left" valign="top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><p class="table"><tt>visible_to_all</tt></p></td>
<td align="center" valign="top"><p class="table">not set if <tt>false</tt></p></td>
<td align="left" valign="top"><p class="table">Whether the group is visible to all registered users.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect2">
<h3 id="group-options-input">GroupOptionsInput</h3>
<div class="paragraph"><p>New options for a group.</p></div>
<div class="tableblock">
<table rules="all"
width="50%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="14%" />
<col width="14%" />
<col width="71%" />
<thead>
<tr>
<th align="left" valign="top">Field Name      </th>
<th align="center" valign="top"></th>
<th align="left" valign="top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><p class="table"><tt>visible_to_all</tt></p></td>
<td align="center" valign="top"><p class="table">not set if <tt>false</tt></p></td>
<td align="left" valign="top"><p class="table">Whether the group is visible to all registered users.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect2">
<h3 id="members-input">MembersInput</h3>
<div class="paragraph"><p>The <tt>MembersInput</tt> entity contains information about accounts that should
be added as members to a group or that should be deleted from the group.</p></div>
<div class="tableblock">
<table rules="all"
width="50%"
frame="border"
cellspacing="0" cellpadding="4">
<col width="14%" />
<col width="14%" />
<col width="71%" />
<thead>
<tr>
<th align="left" valign="top">Field Name   </th>
<th align="center" valign="top"></th>
<th align="left" valign="top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top"><p class="table"><tt>_one_member</tt></p></td>
<td align="center" valign="top"><p class="table">optional</p></td>
<td align="left" valign="top"><p class="table">The <a href="#account-id">id</a> of one account that should be added or
deleted.</p></td>
</tr>
<tr>
<td align="left" valign="top"><p class="table"><tt>members</tt></p></td>
<td align="center" valign="top"><p class="table">optional</p></td>
<td align="left" valign="top"><p class="table">A list of <a href="#account-id">account ids</a> that identify the accounts that
should be added or deleted.</p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<hr style="
  height: 2px;
  color: silver;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
">
<div class="paragraph"><p>Part of <a href="index.html">Gerrit Code Review</a></p></div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Version 2.7<br />
Last updated 2013-09-18 15:19:55 PDT
</div>
</div>
</body>
</html>
